package 蓝桥第二期2024;
import java.util.Scanner;

public class task3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < arr.length; i++) {
            int num = sc.nextInt();
            arr[i] = num;
        }
        int conut = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] % 2 == 0) {
                conut++;
            }
        }
        if (conut == 0) {
            System.out.println("数据不存在偶数");
            return;
        }
        //计算数组里面的最小偶数
        int min=1000000;
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] % 2 == 0) {
                if (arr[i] <= min) {
                    min = arr[i];
                }
            }
        }
        System.out.println(min);
    }
}
